package com.lhl.dubboconsumer.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.lhl.dubboprovider.service.HelloService;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author LHL
 * @date: 2019/3/13
 */
@RestController
public class HelloController {

    @Reference
    private HelloService helloService;

    @RequestMapping(value = "/hello/{message}")
    public String helloDemo(@PathVariable String message ){
        return helloService.hello(message);
    }
}
